package fw.asmx.launcher.utils;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

public class ThreadProcess
{
    private static ScheduledExecutorService ses= Executors.newScheduledThreadPool(1);

    public static void setTask(Runnable run)
    {
        ses.execute(run);
    }

    public static void setSingleTimer(Runnable run,int delaySec)
    {
        ses.schedule(run,delaySec,TimeUnit.SECONDS);
    }
}